package com.tenement.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

@Getter
@AllArgsConstructor
@ToString
public enum RespBusiness {

    SUCCESS(200, "成功"),

    FAIL(500, "失败"),

    THREAD_INTERRUPT(500,"线程中断"),

    ERROR(400, "错误"),

    INVALID_FORMAT(400, "格式错误"),

    FILE_IS_EMPTY(400,"文件为空"),

    INVALID_FILE(400, "文件格式错误"),

    INVALID_FILE_SIZE(400, "文件大小错误"),

    INVALID_FILE_TYPE(400, "文件类型错误"),

    INVALID_FILE_EXT(400, "文件后缀错误"),

    INVALID_FILE_NAME(400, "文件名错误"),

    INVALID_FILE_PATH(400, "文件路径错误"),

    INVALID_FILE_DIR(400, "文件目录错误"),

    TOO_SHORT(400, "密码太短"),

    TOO_LONG(400, "密码太长"),

    WEAK_PASSWORD(400, "弱密码"),

    PASSWORD_MISMATCH(400, "账号或者密码不匹配"),

    PARAM_VALID_ERROR(400,"请求参数错误"),

    PRESENCE_DATA(400, "数据已经存在"),

    UNAUTHORIZED(401, "未授权"),


    ACCOUNT_UNAVAILABLE(401, "账号不可用"),

    CANNOT_DELETE_WITH_CHILDREN(403, "无法删除存在下级菜单的菜单项"),

    PERMISSION_DENIED(4003, "权限不足,无法操作"),

    HAS_ADMIN_PROPERTY(403, "存在物业管理员,不能删除"),

    SUBORDINATE_NODE(403, "存在下级节点,不能删除"),

    NOT_FOUND(404, "未找到"),

    NO_USER_EXISTS(404, "用户不存在"),

    USER_EXISTS(404, "用户已存在"),

    FORBIDDEN(403, "禁止访问"),

    SERVER_ERROR(500, "服务器错误"),

    TOKEN_ILLEGAL(5005,"登录超时,请重新登录!"),

    NO_LOGIN(5005,"没有登录,请登录在操作!"),

    PARAM_ERROR(400, "参数错误"),

    EXPIRED_LOGIN(500,"过期登录"),

    HOUSE_EXISTING_USER(500,"房屋存在住户,不可删除,只可编辑"),

    NO_BOUND_PROPERTY(500,"没有绑定物业不可以分配角色"),

    NO_VOTE(500,"该决议已结束或者没有开始"),

    NO_RESOLUTION(500,"没有该决议,无法投票!"),

    WRONG_OLD_PASSWORD(500, "原密码错误"),

    VOTE_LIMIT(500, "投票已达上限"),

    DAY_VOTE_LIMIT(500, "天投票已达上限"),
    FREQUENT_OPERATION(500, "操作频繁");

    private final int code;

    private final String msg;

}
